#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <vtkSmartPointer.h>
#include <vtkMapper.h>
#include <vtkPolyData.h>
#include <QMap>
class vtkRenderer;
class fVoxelsAnalysis;
class QVTKOpenGLWidget;
namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = nullptr);
    ~Widget();
    void updateVtk();
protected slots:
    void onOpen();
    void onAnalysis();
    void onLog(const QString&msg);
    void onColculateNormals();
protected:
    void keyPressEvent(QKeyEvent*e);
    void mousePressEvent(QMouseEvent *e);
    void initVtkWindow();
    void test();
public:
   vtkSmartPointer<vtkRenderer> _renderer;
   fVoxelsAnalysis*_analysis;
   QVTKOpenGLWidget* _widget;
   QList<vtkSmartPointer<vtkPolyData>> _models;
private:
    Ui::Widget *ui;
};

#endif // WIDGET_H
